﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace AliPayWinForm
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.webBrowser1.Document.GetElementById("J-input-user").SetAttribute("value", textBox1.Text);
            this.webBrowser1.Document.GetElementById("password_rsainput").SetAttribute("value", textBox2.Text);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.webBrowser1.Document.GetElementById("J-login-btn").InvokeMember("click");
        }

        private void button3_Click(object sender, EventArgs e)
        {
            MessageBox.Show(this.webBrowser1.Document.Cookie);
        }
    }
}
